﻿using EzFrameWork;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class LoadImage : MonoBehaviour {
    Image image;
    // Use this for initialization

    void Start()
    {
        image = GetComponent<Image>();
        //image.sprite = ToolUnity.LoadSpriteFromPath(Application.streamingAssetsPath + "/t1.png", 1024, 1024);

        EzDataRWS.LoadPictureToTexture2DAsy("http://ww1.sinaimg.cn/large/97b37077gw1eywn8rbpd6j218g0p0td5.jpg", (e) =>
        {
            e.EncodeToJPG();
            image.sprite = EzDataRWS.Texture2DToSpiret(e);
        });
    }
}